
<div id="content">

    <div class="container-fluid">
        <div class="span4">
            <div class="widget-box">
                <div class="widget-title"> <span class="icon"> <i class="icon-arrow-right"></i> </span>
                    <h5>微信支付统计</h5>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered">
                        <tbody>
                        <tr>
                            <td><a href="#">价格</a></td>
                            <td>{$statPayType1.sumAmount}</td>
                        </tr>
                        <tr>
                            <td><a href="#">订单数量</a></td>
                            <td>{$statPayType1.countOrderNum}</td>
                        </tr>
                        <tr>
                            <td><a href="#">已付款价格</a></td>
                            <td>{$statPayType1.alreadySumAmount}</td>
                        </tr>
                        <tr>
                            <td><a href="#">已付款订单数量</a></td>
                            <td>{$statPayType1.alreadyCount}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <div class="span4">
            <div class="widget-box">
                <div class="widget-title"> <span class="icon"> <i class="icon-arrow-right"></i> </span>
                    <h5>货到付款统计</h5>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered">
                        <tbody>
                        <tr>
                            <td><a href="#">价格</a></td>
                            <td>{$statPayType0.sumAmount}</td>
                        </tr>
                        <tr>
                            <td><a href="#">订单数量</a></td>
                            <td>{$statPayType0.countOrderNum}</td>
                        </tr>
                        <tr>
                            <td><a href="#">已付款价格</a></td>
                            <td>{$statPayType0.alreadySumAmount}</td>
                        </tr>
                        <tr>
                            <td><a href="#">已付款订单数量</a></td>
                            <td>{$statPayType0.alreadyCount}</td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <div class="row-fluid">

            <div class="span12">

                <div class="controls controls-row">

                    <a href="{:U('Business/myHrefOrder',array('condition'=>1))}" class="btn" style="width:15%; height:50px; line-height:50px; border:5px solid #008200; color:#000; font-size:24px; margin-top:5px;">交易成功</a>
                    <a href="{:U('Business/myHrefOrder',array('condition'=>2))}" class="btn" style="width:15%; height:50px; line-height:50px; border:5px solid #cc0000; color:#000; font-size:24px; margin-top:5px;">交易未成功</a>
                    <a href="{:U('Business/myHrefOrder',array('condition'=>3))}" class="btn" style="width:15%; height:50px; line-height:50px; border:5px solid #000080; color:#000; font-size:24px; margin-top:5px;">已付款</a>
                    <a href="{:U('Business/myHrefOrder',array('condition'=>4))}" class="btn" style="width:15%; height:50px; line-height:50px; border:5px solid #ff5500; color:#000; font-size:24px; margin-top:5px;">未付款</a>
                    <a href="{:U('Business/myOrder')}" class="btn" style="width:15%; height:50px; line-height:50px; border:5px solid #000000; color:#000; font-size:24px; margin-top:5px;">全部订单</a>
                    <hr>

                    <form name="orderCond" method="post">
                        <input style="display:none;" type="text" value="{:U('Business/myOrder?condition=1')}" name="pay_status_b" />
                        <input style="display:none;" type="text" value="{:U('Business/myOrder?condition=2')}" name="pay_type_b" />
                        <input style="display:none;" type="text" value="{:U('Business/myOrder?condition=3')}" name="time" />
                        <input style="display:none;" type="text" value="{:U('Business/myOrder?condition=4')}" name="order_sn_b" />
                        <input style="display:none;" type="text" value="{:U('Business/myOrder?condition=5')}" name="order_status_b" />

                        <a class="btn btn-primary" style="float:left;" href="{:U('Business/myOrder')}">所有信息</a>&nbsp;

                        <input name="order_sn" class="span2" value="" onblur="sub_pay_status(4)" placeholder="订单编码"/>

                        <select name="order_status" class="span2" onchange="sub_pay_status(5)">
                            <option selected="selected"> -- 交易状态 -- </option>
                            <option value="0">未成功</option>
                            <option value="2">成功</option>
                        </select>

                        <script>
                            var order_status={$order_status};
                            if(typeof(order_status)=='number'){
                                $("select[name='order_status']").children("option").each(
                                        function(){
                                            if($(this).val()==order_status)
                                            {
                                                $(this).attr("selected","selected");
                                            }
                                        }
                                );
                            }
                        </script>

                        <select name="pay_status" class="span2" onchange="sub_pay_status(1)">
                            <option selected="selected"> -- 支付状态 -- </option>
                            <option value="0">未付款</option>
                            <option value="1">付款中</option>
                            <option value="2">已付款</option>
                        </select>

                        <script>
                            var pay_status={$pay_status};
                            if(typeof(pay_status)=='number'){
                                $("select[name='pay_status']").children("option").each(
                                        function(){
                                            if($(this).val()==pay_status)
                                            {
                                                $(this).attr("selected","selected");
                                            }
                                        }
                                );
                            }
                        </script>

                        <select name="pay_type" class="span2" onchange="sub_pay_status(2)">
                            <option selected="selected"> -- 支付方式 -- </option>
                            <option value="0">货到付款</option>
                            <option value="1">微信支付</option>
                            <option value="2">门店自提</option>
                        </select>

                        <script>
                            var pay_type={$pay_type};
                            if(typeof(pay_type)=='number'){
                                $("select[name='pay_type']").children("option").each(
                                        function(){
                                            if($(this).val()==pay_type)
                                            {
                                                $(this).attr("selected","selected");
                                            }
                                        }
                                );
                            }
                        </script>

                        <input style="width:100px" name="endTime" readonly="readonly" type="text" data-date-format="mm-dd-yyyy" class="datepicker span2" placeholder="时间范围(起)" onclick="sub_pay_status(3)">
                        <input style="width:100px" name="startTime" readonly="readonly" type="text" data-date-format="mm-dd-yyyy" class="datepicker span2" placeholder="时间范围(止)" onclick="sub_pay_status(3)">

                    </form>
                </div>
                <script>
                    function sub_pay_status(action)
                    {

                        if(action==1)
                        {
                            var url=$("input[name='pay_status_b']").val();
                            document.orderCond.action=url;
                            orderCond.submit();
                        }
                        else if(action==2)
                        {
                            var url=$("input[name='pay_type_b']").val();
                            document.orderCond.action=url;
                            orderCond.submit();
                        }
                        else if(action==3)
                        {
                            var startTime=$("input[name='startTime']").val();
                            var endTime=$("input[name='endTime']").val();
                            if(startTime!=""&&endTime!="")
                            {
                                var url=$("input[name='time']").val();
                                document.orderCond.action=url;
                                orderCond.submit();
                            }
                        }
                        else if(action==4)
                        {
                            if($("input[name='order_sn']").val()!="")
                            {
                                var url = $("input[name='order_sn_b']").val();
                                document.orderCond.action = url;
                                orderCond.submit();
                            }
                        }
                        else if(action==5)
                        {
                            if($("input[name='order_status']").val()!="")
                            {
                                var url = $("input[name='order_status_b']").val();
                                document.orderCond.action = url;
                                orderCond.submit();
                            }
                        }
                    }

                </script>

                <div class="widget-box">
                    <div class="widget-title"><span class="icon">
            <input type="checkbox" id="title-checkbox" name="title-checkbox" />
            </span>
                        <h5>订单列表</h5>
                    </div>
                    <div class="widget-content nopadding">
                        <table class="table table-bordered table-striped with-check">
                            <thead>
                            <tr>
                                <th><i class="icon-resize-vertical"></i></th>
                                <th>姓名</th>
                                <th>手机</th>
                                <th>价格</th>
                                <th>下单时间</th>
                                <th>回款</th>
                            </tr>
                            </thead>

                            <volist name="orderList" id="vo">
                                <tbody>

                                    <tr>
                                        <td><input type="checkbox" /></td>
                                        <td><a href="{:U('Business/orderInfo',array('id'=>$vo[id]))}">{$vo.name}</a></td>
                                        <td><a href="{:U('Business/orderInfo',array('id'=>$vo[id]))}">{$vo.phone}</a></td>
                                        <td><a href="{:U('Business/orderInfo',array('id'=>$vo[id]))}">{$vo.amount}</a></td>
                                        <td><a href="{:U('Business/orderInfo',array('id'=>$vo[id]))}">{$vo.add_time_b}</a></td>
                                        <td><a href="{:U('Business/orderInfo',array('id'=>$vo[id]))}">{$vo.return_money_b}</a></td>
                                    </tr>

                                </tbody>
                            </volist>
                        </table>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<script src="__PUBLIC__js/fullcalendar.min.js"></script>
<script src="__PUBLIC__js/matrix.calendar.js"></script>
<script src="__PUBLIC__js/matrix.tables.js"></script>
<script src="__PUBLIC__js/matrix.form_common.js"></script>
<script src="__PUBLIC__js/jquery.ui.custom.js"></script>
<script src="__PUBLIC__js/bootstrap.min.js"></script>
<script src="__PUBLIC__js/bootstrap-colorpicker.js"></script>
<script src="__PUBLIC__js/bootstrap-datepicker.js"></script>
<script src="__PUBLIC__js/jquery.toggle.buttons.html"></script>
<script src="__PUBLIC__js/masked.js"></script>
<script src="__PUBLIC__js/jquery.uniform.js"></script>
<script src="__PUBLIC__js/select2.min.js"></script>
<script src="__PUBLIC__js/matrix.js"></script>
<script src="__PUBLIC__js/wysihtml5-0.3.0.js"></script>
<script src="__PUBLIC__js/jquery.peity.min.js"></script>
<script src="__PUBLIC__js/bootstrap-wysihtml5.js"></script>
<script src="__PUBLIC__js/jquery.dataTables.min.js"></script>
<script src="__PUBLIC__js/yanGradyJS/yanGrady.js"></script>